<?php
session_start();
set_include_path(get_include_path() . PATH_SEPARATOR . '.' . PATH_SEPARATOR . './libs/');
require_once('./libs/Smarty/Smarty.class.php');
$ls = new Smarty();
		if(isset($_SESSION['userinfo']))
		{
				$ls->assign('username',$_SESSION['userinfo']['username']);
				$ls->assign('userage',$_SESSION['userinfo']['userage']);
				$ls->assign('userinfo',$_SESSION['userinfo']['userjianjie']);
				$ls->display('write.html');
		}else
		{
//			echo "Not OK";
			$ls->display('error.html');
		}
?>